package com.kun.companion.core.queue.ui.button;

import javafx.scene.Node;

/**
 * 异步事件按钮，点击按钮后事件后台运行，不需要等待事件执行完毕后可重复点击按钮，
 * 核心代码{@link #updateUIState}重写方法，添加核心代码super.isProcessing = false;
 *
 * @author gzc
 * @since 2025/2/5
 **/
public class AsyncEventButton extends AwaitEventButton {

    public AsyncEventButton() {
        this("默认按钮");
    }
    public AsyncEventButton(String buttonText) {
        this(buttonText, null, "");
    }

    public AsyncEventButton(String buttonText, Node svgGraphic, String tipText) {
        super(buttonText, svgGraphic, tipText);
    }

    @Override
    protected void updateUIState() {
        // 强制不进入运行中状态
        super.isProcessing = false;
    }
}
